import { getWithErrorMessage, postWithErrorMessage } from '@/utils/http/Axios'

// 列表
export function applicationList(data: any) {
    return postWithErrorMessage('/taishan-runtime/api/v1/application/search', data).then(resp => resp.data)
}

// 获取应用发布后的分类和表单列表
export function getPublishedPageCategory(data: any) {
    return postWithErrorMessage('/taishan-runtime/api/v1/category/list', data).then(resp => resp.data)
}

// 获取发布后的页面详情
export function fetchPublishPageDetail(pageId: string | number) {
    return getWithErrorMessage(`/taishan-runtime/api/v1/page/${pageId}`).then(resp => resp.data)
}

// 查询部门列表
export function getDepartmentTree(data: any) {
    return postWithErrorMessage('/base/api/v1/department/tree', data).then(resp => resp.data)
}
